package interaction.input.concrete;

import processing.core.PGraphics;
import processing.core.PImage;
import processing.core.PVector;
import interaction.input.DataComponent;

public class ImagePromptComponent extends DataComponent<Boolean> {
	private PImage image;
	
	public ImagePromptComponent(PVector position, PImage image) {
		super(position, new PVector(image.width, image.height));
		this.image = image;
	}
	
	public PImage getImage() {
		return image;
	}

	protected void drawRelative(PGraphics g) {
		g.image(getImage(), 0, 0);
	}
	
	public void mousePressed(PVector p) {
		getDataSource().set(true);
	}
	
	public void keyPressed(char c) {
		getDataSource().set(true);
	}
}
